using Moq;
using NUnit.Framework;
using Tycho.Parser.Peg;

namespace Tycho.Parser.Tests.Peg {
    [TestFixture]
    public class LiteralRuleSpecification {
        [Test]
        public void ShouldReturnTrueToHasProduction () {
            Assert.That (((IRule) new LiteralRule (new Mock<IProduction> ().Object)).HasProduction);
        }

        [Test]
        public void ProductionShouldBeProductionGiven () {
            var production = new Mock<IProduction> ().Object;
            Assert.That (((IRule) new LiteralRule (production)).Production, Is.SameAs (production));
        }
    }
}